<html>
<head>
    <meta charset="UTF-8">
    <title>户学教育</title>
    <meta name="keywords" content="户学教育">
    <meta name="Description" content="户学教育"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,  user-scalable=0"/>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/idangerous.swiper.css?t={time()}.{rand(10000,9999999)}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/common.css?t={time()}.{rand(10000,9999999)}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/mine.css?t={time()}.{rand(10000,9999999)}"/>

    <script src="{HOME_THEME_PATH}../gw/js/jquery.min.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript"t src="{THEME_PATH}js/dialog-plus.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery.artDialog.js?t={time()}.{rand(10000,9999999)}&skin=default"></script>
    <script type="text/javascript" src="{THEME_PATH}js/dayrui.js?t={time()}.{rand(10000,9999999)}"></script>
    <script type="text/javascript" src="{HOME_THEME_PATH}../gw/js/le_include_head.js?t={time()}.{rand(10000,9999999)}"></script>
    <link rel="icon" href="{HOME_THEME_PATH}../gw/img/f-logo.png" type="image/png" sizes="16x16">

    <script name="baidu-koubei-verification" src="//ikoubei.baidu.com/embed/58ea9664cf897d52f78ec69fff1379d6"></script>
    <link href="{THEME_PATH}admin/global/css/form_default.css?t={time()}.{rand(10000,9999999)}" rel="stylesheet"  />

</head>
<body>
<div class="main">
    <!-- 头部 -->
    {template "../gw/common.html"}
    <div class="part part1">
        <div class="part-cont">
            <!-- 目录 -->
            <div class="menu-items">
                <a class="menu-item active" href="{dr_user_url('home/index')}">个人中心</a>
                <!--<div class="menu-item">我的课表</div>-->
                <!--<div class="menu-item">课程推荐</div>-->
                <a class="menu-item le-my-order" href="{dr_user_url('pay/myorder')}">我的订单</a>
                 <a class="menu-item" href="{dr_user_url('pay/electivecenter')}">选课中心</a>
                <a class="menu-item" href="{dr_user_url('pay/changepassword')}">修改密码</a>
            </div>
            <!-- 内容 -->
            <div class="cont-items">
                <!-- 个人中心 -->
                <div class="cont-item active">
                    <!-- 页面导航 -->
                    <div class="cont4-title">
                        <div class="cont4-main-title">个人中心</div>
                    </div>
                    <!-- 个人信息 -->
                    <div class="cont1-info">
                        <div class="cont1-img-wrap">
                            <img src="{if !empty($user.avatar)}{$user.avatar}{else}{HOME_THEME_PATH}../gw/img/mine-cont1-img.png{/if}" alt="" class="cont1-img">
                            <input class="img-upload"  id="load_img" type="file" onchange ="uploadFile()"></input>
                        </div>
                        <div class="cont1-name"></div>
                        <div class="cont1-title1">资料完成度<span>20%</span></div>
                        <div class="cont1-btn-change">完善资料</div>
                    </div>
                    <!-- 课时显示 -->
                    <div class="cont1-class">
                        <!-- 课时导航 -->
                        <div class="cont1-tabs">
                            <div class="cont1-tab active">1v4</div>
                            <div class="cont1-tab">1v1</div>
                        </div>
                        <div class="cont1-class-items">
                            <div class="cont1-class-item active">
                                <div class="cont1-class-conts">
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">总课时</p>
                                    </div>
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">剩余课时</p>
                                    </div>
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">已完成课时</p>
                                    </div>
                                </div>
                            </div>
                            <div class="cont1-class-item">
                                <div class="cont1-class-conts">
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">总课时</p>
                                    </div>
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">剩余课时</p>
                                    </div>
                                    <div class="cont1-class-cont">
                                        <p class="cont1-class-num">0</p>
                                        <p class="cont1-class-title">已完成课时</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 完善资料 -->
                    <div class="cont1-change">
                        <form method="post">
                            <input type="hidden" name="upload_img" value="{$user.avatar}"/>
                            <input type="" name="name" value='{$user.name}' class="input-item input-name">
                            <input type="hidden" name="uid" value="{$user.id}"/>
                            <!-- 性别 -->
                            <div class="input-wrap input-wrap-sex">
                                <select class="select-item select-sex" name="sex" id="">
                                    <option value="">请选择</option>
                                    <option value="1"{if $users.sex==1}selected{/if}>女</option>
                                    <option value="2" {if $users.sex==2}selected{/if}>男</option>
                                </select>
                                <div class="select-dic"></div>
                            </div>
                            <!-- 省市三级 -->
                            <div class="input-area">
                                <!-- 省 -->
                                <div class="input-wrap input-wrap-province">
                                    <select class="select-item select-province" name="province" id="province">
                                        <option value="">省</option>
                                    </select>
                                    <div class="select-dic"></div>
                                </div>
                                <!-- 市 -->
                                <div class="input-wrap input-wrap-city">
                                    <select class="select-item select-city" name="city" id="city">
                                        <option value="">市</option>
                                    </select>
                                    <div class="select-dic"></div>
                                </div>
                                <!-- 区 -->
                                <div class="input-wrap input-wrap-area">
                                    <select class="select-item select-area" name="area" id="county">
                                        <option value="">区</option>
                                    </select>
                                    <div class="select-dic"></div>
                                </div>
                            </div>
                            <div class="form-btn form-btn1">保存</div>
                        </form>
                    </div>
                </div>
                <!-- 我的课表 -->
                <!--<div class="cont-item">-->
                <!--<div class="cont2-class-head">-->
                <!--<div class="cont2-class-left"></div>-->
                <!--<div class="cont2-class-mouth-now"></div>-->
                <!--<div class="cont2-class-right"></div>-->
                <!--&lt;!&ndash; 上课信息 &ndash;&gt;-->
                <!--<div class="cont2-class-info">-->
                <!--<span class="cont2-class-info1">今日</span>-->
                <!--<span class="cont2-class-info2">14:25-14:45</span>-->
                <!--<span class="cont2-class-info3">1v4</span>-->
                <!--<span class="cont2-class-info4">未上课</span>-->
                <!--</div>-->
                <!--&lt;!&ndash; 进入教室 &ndash;&gt;-->
                <!--<a href="javascript:;" class="cont2-btn-enter">进入教室</a>-->
                <!--</div>-->
                <!--&lt;!&ndash; 日历 &ndash;&gt;-->
                <!--<div class="date-wrap">-->
                <!--<div class="week-items">-->
                <!--<div class="week-item">周日</div>-->
                <!--<div class="week-item">周一</div>-->
                <!--<div class="week-item">周二</div>-->
                <!--<div class="week-item">周三</div>-->
                <!--<div class="week-item">周四</div>-->
                <!--<div class="week-item">周五</div>-->
                <!--<div class="week-item">周六</div>-->
                <!--</div>-->
                <!--<div class="data-border-items"></div>-->
                <!--<div class="data-items"></div>-->
                <!--</div>-->
                <!--</div>-->
                <!-- 课程推荐 -->
                <!--<div class="cont-item">课程推荐</div>-->
                <!-- &lt;!&ndash; 我的订单 &ndash;&gt; -->
                <!-- 选课中心 -->
                <!--<div class="cont-item cont-item5">-->
                <!--<div class="cont5-title">课程类型<span>请选择您需要的课程类型</span></div>-->
                <!--<div class="cont5-type cont5-type1">-->
                <!--<div class="cont5-item active">1v1专属定制班</div>-->
                <!--<div class="cont5-item">1v4专属定制班</div>-->
                <!--</div>-->
                <!--<div class="cont5-title">课时<span>请选择您需要的课时</span></div>-->
                <!--<div class="cont5-type cont5-type2">-->
                <!--<div class="cont5-item active">120</div>-->
                <!--<div class="cont5-item">180</div>-->
                <!--<div class="cont5-item">360</div>-->
                <!--<div class="cont5-item">540</div>-->
                <!--<div class="cont5-item">720</div>-->
                <!--</div>-->
                <!--<div class="cont5-title">级别<span>请选择您需要的课时</span></div>-->
                <!--<div class="cont5-type cont5-type3">-->
                <!--<div class="cont5-item active">语文</div>-->
                <!--<div class="cont5-item">数学</div>-->
                <!--<div class="cont5-item">英语</div>-->
                <!--<div class="cont5-item">物理</div>-->
                <!--<div class="cont5-item">化学</div>-->
                <!--<div class="cont5-item">政治</div>-->
                <!--<div class="cont5-item">历史</div>-->
                <!--<div class="cont5-item">地理</div>-->
                <!--<div class="cont5-item">生物</div>-->
                <!--</div>-->
                <!--<div class="cont5-title">级别<span>请选择您需要的课时</span></div>-->
                <!--<div class="cont5-type cont5-type4">-->
                <!--<div class="cont5-item active">小学</div>-->
                <!--<div class="cont5-item">中考自考/高考自招</div>-->
                <!--<div class="cont5-item">初一</div>-->
                <!--<div class="cont5-item">初二</div>-->
                <!--<div class="cont5-item">初三</div>-->
                <!--<div class="cont5-item">高一</div>-->
                <!--<div class="cont5-item">高二</div>-->
                <!--<div class="cont5-item">高三</div>-->
                <!--</div>-->
                <!--<div class="cont5-nums">-->
                <!--<p>原价：<span cont5-num1>18000</span> &nbsp;<span class="cont5-color">限时优惠80%</span></p>-->
                <!--<p>折后心动价：<span  class="cont5-color">￥</span><span class="cont5-color cont5-num2">14400</span></p>-->
                <!--</div>-->
                <!--&lt;!&ndash; 确认提交 &ndash;&gt;-->
                <!--<div class="form-btn form-btn2">确认支付</div>-->
                <!--</div>-->
            </div>
        </div>
    </div>

    <!-- 页尾 -->
    {template "../gw/footer.html"}
</div>


<!-- 滑动验证窗口 -->
<div class="slide-box">
    <div class="slide-box-wrap">
        <div class="foo-box">
            <div id="foo"></div>
        </div>
    </div>
</div>

</body>
<script>
    $(function(){
        $(".cont1-btn-change").click(function(){
            var user = '{$data}';
            us = JSON.parse(user);
            // alert(user);
            $(".cont1-name").html(us.name);
            $("input[name='name']").val(us.name);
            if(us.sex == 1){
                $(".select-sex").find('option').eq(1).val(1).text('女').prop("selected",true);
            }else if(us.sex == 2){
                $(".select-sex").find('option').eq(2).val(2).text('男').prop("selected",true);
            }else{
                $(".select-sex").find('option').eq(0).val('').text('请选择').prop("selected",true);
            }
            //判断省市区是否被选择
            var province = us.province,
                city = us.city,
                area = us.area;

            if(province){
                city_select(".select-province option",province);
            }
            if(city){
                $(".select-city").html("<option value='"+city+"'>"+city+"</option>");
            }
            if(area){
                $(".select-area").html("<option value='"+area+"'>"+area+"</option>");
            }

        });
        function city_select(position,verification){
            $(position).each(function(){
                if($(this).val()==verification){
                    $(this).prop("selected",true);
                }
            });
        }


    });
</script>
<script>
    function uploadFile(){
        // alert('123');
        var myform = new FormData();
        myform.append('img',$('#load_img')[0].files[0]);
        // console.log(s);return false;
        $.ajax({
            url: "index.php?s=user&c=home&m=uploadImg",
            type: "POST",
            data: myform,
            contentType: false,
            processData: false,
            success: function (data) {
                console.log(data);
                var obj = JSON.parse(data);
                if(obj.status == 1){
                    $('input[name="upload_img"]').val(obj.img_url)
                }
            },
            error:function(data){
                console.log(data)
            }
        });
    }
</script>
<script src="{HOME_THEME_PATH}../gw/js/idangerous.swiper.min.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/area.js?t={time()}.{rand(10000,9999999)}"></script>
<!-- <script src="{HOME_THEME_PATH}../gw/js/alloy-crop.js?t={time()}.{rand(10000,9999999)}"></script> -->
<script src="{HOME_THEME_PATH}../gw/js/lrz.mobile.min.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/mine.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/iscroll.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/unlock.js?t={time()}.{rand(10000,9999999)}"></script>
<script src="{HOME_THEME_PATH}../gw/js/jquery.slideunlock.min.js?t={time()}.{rand(10000,9999999)}"></script>
</html>